<script>
export default {
    name: "Song",
    data(){
        return{
            tableData:[],  //表格数据
            currentPage: 1,//默认显示第一页
            pageSize:10,//默认每页显示10条
            totalNum: 0,    //总条数
            pageNum:0,  //查询页码 初始值为0
            totalpages:0 //总页数
        }
    }
}
</script>

<template>
    <div id="formTable">
        <el-table
            :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
            border
            style="width: 100%"
            :header-cell-style="{'text-align': 'center',backgroundColor: '#1890ff',color:'#fff'}"
            :cell-style="{'text-align': 'center'}">
            <el-table-column
                prop="shopId"
                label="订单ID">
            </el-table-column>
            <el-table-column
                prop="shopPhone"
                label="用户手机号">
            </el-table-column>
            <el-table-column
                prop="shopName"
                label="昵称">
            </el-table-column>
            <el-table-column
                prop="shopAddress"
                label="地址">
            </el-table-column>
            <el-table-column
                prop="shopmessage"
                label="发件信息">
            </el-table-column>
            <el-table-column
                prop="concernStatus"
                label="收件信息">
            </el-table-column>
            <el-table-column
                prop="shopCommunitySort"
                label="备注信息">
            </el-table-column>
            <el-table-column
                prop="shopTime"
                label="下单时间">
            </el-table-column>
            <el-table-column
                prop="shopStatus"
                label="状态">
                <template v-slot="scope">
                    <!-- 假设 shopStatus 为 1 时显示“上架”，否则显示“已下架” -->
                    {{ scope.row.shopStatus === 1 ? '已上架' : '已下架' }}
                </template>
            </el-table-column>
            <el-table-column
                label="操作">
                <template slot-scope="scope">
<!--                    <el-button @click="handleClick(scope.row)" type="text" size="small"></el-button>-->
<!--                    <el-button @click="editClick(scope.row)" type="text" size="small"></el-button>-->
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<style scoped>
#formTable{
    margin-top: 20px;
    table-layout: auto;
}
</style>